#include<bits/stdc++.h>
#define ll long long
#define int ll
#define L x<<1
#define R L|1
#define mid (l+r>>1)
#define lc L,l,mid
#define rc R,mid+1,r
#define OK Ll<=l&&r<=Rr
#define Root 1,1,n
#define rep(x,y,z) for(int x=(y);x<=(z);x++)
#define per(x,y,z) for(int x=(y);x>=(z);x--)
#define repn(x) rep(x,1,n)
#define repm(x) rep(x,1,m)
#define pb push_back
#define e(x) for(int i=h[x],y=to[i];i;i=nxt[i],y=to[i])
#define E(x) for(auto y:p[x])
#define Pi pair<int,int>
#define ui unsigned ll
inline int read(){int s=0,w=1;char c=getchar();while(c<48||c>57) {if(c=='-') w=-1;c=getchar();}while(c>=48&&c<=57)s=(s<<1)+(s<<3)+c-48,c=getchar();return s*w;}
inline void pf(int x){if(x<0) putchar('-'),x=-x;if(x>9)pf(x/10);putchar(x%10+48);}
using namespace std;
const int N =1e6+5,M=1e6+5,inf=(1LL<<31)-1,mod=998244853;
const ll llf=1e18;
inline void add(int &a,int b){((a+=b)>=mod) and (a-=mod);}
inline int Add(int a,int b){return add(a,b),a;}
inline int mul(int a,int b){return 1LL*a*b%mod;}
inline void Mul(int &a,int b){a=mul(a,b);}
inline void red(int &a,int b){add(a,mod-b);}
inline int Red(int a,int b){return red(a,b),a;}
inline int qp(int a,int b){if(!b)return 1;int c=qp(a,b>>1);Mul(c,c);if(b&1)Mul(c,a);return c;}
inline int INV(int x){return qp(x,mod-2);}
string s;
int n,A=100,B=99;
const int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
char c[4]={'D','R','U','L'};
char a[105][105];
//R G B 
inline int val(int x,int y){
    return max(x-1,A-x)+max(y-1,B-y);
}
int Mx;
inline void dfs(int x,int y,int pos){
    if(pos==n+1)return;
    Pi nx={0,0};
    int K=-1;
    Mx=max(Mx,val(x,y));
    rep(k,0,3){
        int X=dx[k]+x,Y=dy[k]+y;
        if(X&&Y&&X<=A&&Y<=B){
            if(a[X][Y]!=s[pos])continue;
            if(nx.first==0)K=k,nx={X,Y};
            else if(val(X,Y)<val(nx.first,nx.second))nx={X,Y},K=k;
        }
    }
    if(K==-1){
        cerr<<"Error!!"<<x<<' '<<y<<' '<<pos<<'\n';
        return;
    }
    cout <<c[K];dfs(nx.first,nx.second,pos+1);
}
inline void subtask1(){
    if(n==1000000){
        A=36,B=36;
    }
    for(int i=1;i<=A;i+=2){
        if(i%4==3){
            for(int j=1;j<=B;j+=3){
                a[i][j]=a[i+1][j]='B';
                a[i][j+1]=a[i][j+2]='R';
                a[i+1][j+1]=a[i+1][j+2]='G';
                if(j%6==4)rep(k,0,1)swap(a[i][j+k+1],a[i+1][j+k+1]);
            }
        }else {
            for(int j=1;j<=B;j+=3){
                a[i][j+2]=a[i+1][j+2]='B';
                a[i][j+1]=a[i][j]='R';
                a[i+1][j]=a[i+1][j+1]='G';
                if(j%6==4)rep(k,0,1)swap(a[i][j+k],a[i+1][j+k]);
            }
        }
    }
    cout <<A<<' '<<B<<'\n';
    rep(i,1,A){
        rep(j,1,B)cout <<a[i][j];
        cout<<'\n';
    }
    Pi st={0,0};
    rep(i,1,A)rep(j,1,B)if(a[i][j]==s[1]){
        if(st.first==0)st={i,j};
        else if(val(i,j)<val(st.first,st.second))st={i,j};
    }
    cout <<st.first<<' '<<st.second<<'\n';
    dfs(st.first,st.second,2);
}
inline void Main(){
	cin >>s,n=s.length(),s='#'+s;
    subtask1();
}
signed main(){
	freopen("snake.in","r",stdin);
	freopen("snake.out","w",stdout);
	int T=1;
	while(T--)Main();
	return 0;
}